import { timeStamp } from "console"

class Food {
  el: HTMLElement
  constructor() {
    this.el = document.getElementById('food')!
  }
  get X(){
    return this.el.offsetLeft
  }
  get Y(){
    return this.el.offsetTop
  }
  change() {
    let left = Math.round(Math.random()*39) * 10
    let top = Math.round(Math.random()*39) * 10
    this.el.style.left = left + 'px'
    this.el.style.top = top + 'px' 
  }
}
export default Food